﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HZT.Framework.DAL;
using System.Data.Entity;
using AD.Contract.Models;

using HZT.Core.Log;
using HZT.Core.Config;

namespace AD.DAL
{
    public class ADDbContext : DbContextBase
    { 
        public ADDbContext()
            : base(CachedConfigContext.Current.DaoConfig.AD, new LogDbContext())
        {
        }
         
        public DbSet<ADAppendix> ADAppendixes { get; set; }
        public DbSet<ADBill> ADBills { get; set; }
        public DbSet<ADList> ADLists { get; set; }
        public DbSet<ADPeriod> ADPeriods { get; set; }
        public DbSet<BaseCategory> BaseCategories { get; set; }
        public DbSet<ADCharge> Charges { get; set; }
        public DbSet<Customer> Customers { get; set; }
        public DbSet<Department> Departments { get; set; }
        public DbSet<Employee> Employees { get; set; }
        public DbSet<Period> Periods { get; set; }
        public DbSet<ShowBill> ShowBills { get; set; }
        //public DbSet<Chanel> Chanels { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            Database.SetInitializer<ADDbContext>(null);

            base.OnModelCreating(modelBuilder);
        }
    }
}
